package routers

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func SyBaseRouter(r *gin.RouterGroup) { //不使用中间件
	r.GET("/ping", Ping)
}

func SyBaseRouterWithMiddleWare(r *gin.RouterGroup, middle gin.HandlerFunc) { //使用中间件
	r.Use(middle).GET("/ping", Ping)
}

func Ping(c *gin.Context) {
	c.JSON(http.StatusOK, gin.H{
		"message": "ping",
	})
}
